from django.db import models
from datetime import datetime 
 
class Question(models.Model):
    title = models.CharField("标题", max_length = 200, blank=True)
    desc = models.TextField("描述", blank=True)
    tag = models.CharField("标签", max_length = 50, blank=True)
    create_time = models.DateTimeField('创建时间', default=datetime.now())


class Answer(models.Model):
    question = models.IntegerField()
    answer = models.CharField("标题", max_length = 200, blank=True)
    isbest = models.IntegerField(default = 0)
    create_time = models.DateTimeField('创建时间', default=datetime.now())